<template>
    <div class="empty-wrap">
        <img
            v-if="showEmptyImg && emptyImg"
            class="empty-img"
            :src="emptyImg"
        />
        <p
            v-if="showEmptyText"
            class="empty-text"
        >{{ emptyText || '暂无数据' }}</p>
    </div>
</template>

<script>
export default {
    props: {
        showEmptyImg: { 
            type: Boolean,
            default: true
        },
        showEmptyText: {
            type: Boolean,
            default: true
        },
        emptyImg: {
            type: String,
            default: ''
        },
        emptyText: {
            type: String,
            default: ''
        }
    }
}
</script>

<style lang="less" scoped>
.empty-wrap {
    width: 100%;
    text-align: center;
    &:first-child {
        margin-top: 120px;
    }
    .empty-img {
        width: 540px;
        height: auto;
    }
    .empty-text {
        margin-top: 20px;
        font-size: 28px;
        color: #969799;
    }
 }
</style>